package org.wadael.waverobotfrmwrk.advanced;

import com.google.wave.api.Blip;


/**
 * Interface that defines your sub-robots (or commands)
 * 
 * @author jerome baton : Wadael, http://blog.wadael.org
 *
 */
public interface RobotWorker {
	/**
	 * Returns a string identifying an instruction delimiting the scope of this robot.
	 * Can be null, so that the worker is executed whatever the instruction. 
	 */
	public String getInstruction();
	
	/**
	 * Returns a description of the instruction's behaviour.
	 * This description is used when the robot's usage is displayed. 
	 * @return
	 */
	public String getDescription();
	
	/**
	 *  Entry-point for a worker.
	 * You get all the objects you can use.
	 * 
	 * @param bundle
	 * @param blip
	 * @param event
	 * @param parameters may be null
	 * @return
	 * 
	 */
	public boolean doWork(RobotMessageBundle bundle, Blip blip, Event event, String parameters);
}
